﻿<UserControl x:Class="LiveTiss.Guias.UserControls.ProcedimentoOdontoRevisao"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
    mc:Ignorable="d" x:Name="uc"
    d:DesignHeight="300" Width="910">

    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter" />
    </UserControl.Resources>

    <toolkit:WrapPanel Orientation="Horizontal">
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Codigo Tabela" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                    Text="{Binding Path=Value.procedimentoOdontologia.procedimentoOdonto.codigo,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" Width="180" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Descrição Tabela" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                    Text="{Binding Path=Value.procedimentoOdontologia.procedimentoOdonto.descricao,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" Width="180" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Tabela" FontFamily="Segoe UI" FontSize="13.333"/>
                <ComboBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180" 
                    DisplayMemberPath="Value" SelectedValuePath="Key"
                    ItemsSource="{Binding Path=Value.procedimentoOdontologia.procedimentoOdonto.tipoTabelaItems,ElementName=uc,Mode=OneWay}"
                    SelectedIndex="{Binding Path=Value.procedimentoOdontologia.procedimentoOdonto.tipoTabela,ElementName=uc,Mode=TwoWay,Converter={StaticResource enumConverter},ConverterParameter='Tabela',ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <uc:DenteRegiao Width="210" Margin="1" Value="{Binding Path=Value.procedimentoOdontologia.denteRegiao,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Face" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" MaxLength="5" Width="180"
                    Text="{Binding Path=Value.procedimentoOdontologia.face,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Quantidade" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.procedimentoOdontologia.quantidade,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="QuantidadeUS" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.procedimentoOdontologia.quantidadeUS,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Franquia Participação" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.procedimentoOdontologia.franquiaCoparticipacao,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Valor" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.procedimentoOdontologia.valor,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Data" FontFamily="Segoe UI" FontSize="13.333"/>
                <sdk:DatePicker HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                        SelectedDate="{Binding Path=Value.procedimentoOdontologia._dataRealizacao,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Quantidade Total US" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.quantidadeTotalUS, ElementName=uc, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Total Franquia de Coparticipação:" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.totalFranquiaCoparticipacao, ElementName=uc, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="210" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Valor Total" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180"
                    Text="{Binding Path=Value.valorTotal,ElementName=uc,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
            </StackPanel>
        </Grid>
        <Grid Width="840" Margin="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Justificativa Revisão" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" MaxLength="500"
                                            Text="{Binding Path=Value.justificativaRevisao,ElementName=uc,ValidatesOnDataErrors=True,NotifyOnValidationError=True, ValidatesOnExceptions=True,Mode=TwoWay}" Width="836" />
            </StackPanel>
        </Grid>
    </toolkit:WrapPanel>
</UserControl>
